home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / Nothing / Sources / SOMPart.xh < prev    next >
Encoding:
Text File  |  1996-09-16  |  5.2 KB  |  217 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: SOMPart.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_Module_ODFExamples_defined
  11. #define SOM_Module_ODFExamples_defined 1
  12. #include <som.xh>
  13.  
  14. /*
  15.  * Start of user-defined types:
  16.  */
  17. class SOMClass;
  18. class SOMObject;
  19. class ODFrame;
  20. class ODFacet;
  21. class ODObject;
  22. class ODExtension;
  23. class ODRefCntObject;
  24. class ODPersistentObject;
  25. class ODStorageUnit;
  26. class ODPart;
  27. class ODCanvas;
  28. class ODDragItemIterator;
  29. class ODEmbeddedFramesIterator;
  30. class ODLink;
  31. class ODLinkSource;
  32. class ODObjectSpec;
  33. class ODShape;
  34. class ODStorageUnitView;
  35. class ODTypeList;
  36. class ODTransform;
  37. class ODSession;
  38.  
  39. /*
  40.  * End of user-defined types.
  41.  */
  42. #endif /* SOM_Module_ODFExamples_defined */
  43.  
  44. #ifndef SOM_ODFExamples_ODFNothing_xh
  45. #define SOM_ODFExamples_ODFNothing_xh
  46.  
  47. class ODFExamples_ODFNothing;
  48.  
  49. #define ODFExamples_ODFNothing_MajorVersion 0
  50. #define ODFExamples_ODFNothing_MinorVersion 0
  51.  
  52. /*
  53.  * Passthru lines: File: "C.xh", "before"
  54.  */
  55. class FW_CPart;
  56. #ifdef __MRC__
  57.   #pragma export on
  58.   extern struct ODFExamples_ODFNothingClassDataStructure SOMDLINK ODFExamples_ODFNothingClassData;
  59.   #pragma export off
  60. #endif
  61.  
  62. /* C++ SOM defs */
  63. #include <somcls.xh>
  64. #include <somcm.xh>
  65.  
  66. /* C++ parent defs */
  67. #ifndef SOM_ODPart_xh
  68. #include <Part.xh>
  69. #endif
  70.  
  71. #ifndef ODFExamples_ODFNothing_API
  72. #define ODFExamples_ODFNothing_API
  73. /*
  74.  * -- The Class API
  75.  */
  76.  
  77. /*
  78.  * Start of user-defined types:
  79.  */
  80.  
  81. /*
  82.  * End of user-defined types.
  83.  */
  84.  
  85. #ifdef OLDIBMSOMAPISUPPORT
  86. #define ODFExamples_ODFNothingCClassData ODFExamples_ODFNothingClassData
  87. #define ODFExamples_ODFNothingNewClass(major,minor) somNewVersionedClassReference(ODFExamples_ODFNothing,major,minor)
  88. #endif
  89.  
  90. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  91. #define ODFExamples_ODFNothingMetaClass SOMClass
  92.  
  93. #if PRAGMA_ALIGN_SUPPORTED
  94. #  pragma options align=power
  95. #endif
  96.  
  97. /* The API to the ODFExamples_ODFNothing class object, and the methods it introduces. */
  98. SOMEXTERN struct ODFExamples_ODFNothingClassDataStructure {
  99. #ifdef OLDIBMSOMAPISUPPORT
  100.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  101. #else
  102.     long zero;
  103. #endif
  104.     somStaticClassInfo *sci;
  105.     somDToken        instanceDataToken;
  106.     long reserved [3];
  107.     somMToken GetFrameworkPart;
  108.     somMToken NewFrameworkPart;
  109.     somMToken majorversion;
  110. } SOMDLINK ODFExamples_ODFNothingClassData;
  111.  
  112. #if PRAGMA_ALIGN_SUPPORTED
  113. #  pragma options align=reset
  114. #endif
  115.  
  116. #if !defined(ODFExamples_ODFNothing_Class_Source) && !defined(SOM_Module_sompart_Source)
  117. #if PRAGMA_IMPORT_SUPPORTED
  118. #pragma import list ODFExamples_ODFNothingClassData
  119. #endif
  120. #endif
  121.  
  122.  
  123. /*
  124.  * -- Typedefs and inline method declarations for left path inherited methods
  125.  * -- are omitted because this compilation had -museinheritedmethods in effect
  126.  */
  127.  
  128.  
  129. /*
  130.  * -- Typedefs for ODFExamples_ODFNothing Method Procedures
  131.  */
  132. SOMEXTERN {
  133. typedef FW_CPart*   (* SOMLINK somTD_ODFExamples_ODFNothing_GetFrameworkPart)(ODFExamples_ODFNothing *somSelf, Environment *ev);
  134. typedef FW_CPart*   (* SOMLINK somTD_ODFExamples_ODFNothing_NewFrameworkPart)(ODFExamples_ODFNothing *somSelf, Environment *ev,
  135.         ODPart* partWrapper);
  136. }
  137.  
  138. #endif /* ODFExamples_ODFNothing_API */
  139.  
  140.  
  141. /*
  142.  * -- This emitter treats Method Tokens as Thunks by default.
  143.  * -- Use the sc modifier "nothunks" to change this default
  144.  */
  145. #undef somresolve_
  146. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  147.  
  148. /*
  149.  * -- The C++ Wrapper Class for ODFExamples_ODFNothing
  150.  */
  151. class ODFExamples_ODFNothing : public ODPart
  152. {
  153. public:
  154.  
  155. // ODFExamples_ODFNothing::new registers use of the class object, and then uses somNew
  156. // to allocate memory and load the object method table pointer. 
  157. void *operator new(size_t size)
  158. {
  159.     SOM_IgnoreWarning(size);
  160.     // Allocate memory using the default allocator for ODFExamples_ODFNothing, and
  161.     // clear mem & set method table pointer, call basic initialization
  162. #ifdef SOMCHKNULL
  163.     void * __somResult = (void *)
  164.       somNewObject(ODFExamples_ODFNothing);
  165.     SOMCHKNULL(__somResult);
  166.     return __somResult;
  167. #else
  168.     return (void*) somNewObject(ODFExamples_ODFNothing);
  169. #endif
  170. }
  171.  
  172. // ODFExamples_ODFNothing::delete uses the default deallocator for the object's class.
  173. void operator delete(void * obj)
  174. {
  175.     if (obj) {
  176.         SOM_Resolve(obj,SOMObject,somFree)
  177.            ( (SOMObject*) obj );
  178.     }
  179. }
  180.  
  181. /* method: GetFrameworkPart */
  182. FW_CPart*   GetFrameworkPart(Environment *ev)
  183. {
  184.    #ifdef SOMCHKEXCEPT
  185.    FW_CPart* __somResult = 
  186.       SOM_ResolveD(this,ODFExamples_ODFNothing,ODFExamples_ODFNothing,GetFrameworkPart)
  187.     (this,ev);
  188.       SOMCHKEXCEPT;
  189.    return __somResult;
  190. #else
  191.    return SOM_ResolveD(this,ODFExamples_ODFNothing,ODFExamples_ODFNothing,GetFrameworkPart)
  192.     (this,ev);
  193. #endif
  194. }
  195.  
  196. /* method: NewFrameworkPart */
  197. FW_CPart*   NewFrameworkPart(Environment *ev,
  198.         ODPart* partWrapper)
  199. {
  200.    #ifdef SOMCHKEXCEPT
  201.    FW_CPart* __somResult = 
  202.       SOM_ResolveD(this,ODFExamples_ODFNothing,ODFExamples_ODFNothing,NewFrameworkPart)
  203.     (this,ev,partWrapper);
  204.       SOMCHKEXCEPT;
  205.    return __somResult;
  206. #else
  207.    return SOM_ResolveD(this,ODFExamples_ODFNothing,ODFExamples_ODFNothing,NewFrameworkPart)
  208.     (this,ev,partWrapper);
  209. #endif
  210. }
  211.  
  212. };   /* ODFExamples_ODFNothing */
  213.  
  214.  
  215.  
  216. #endif       /* SOM_ODFExamples_ODFNothing_xh */
  217.